package com.v2.k12;


import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * 测试用@Autowire时没有set方法也是可以完成注入
 */
public class Test {

	public static void main(String[] args) {
		AnnotationConfigApplicationContext applicationContext = new AnnotationConfigApplicationContext(UserService.class);
		UserService userService = (UserService)applicationContext.getBean("userService");
		System.out.println(userService.user11.userName);
	}

}
